﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="EditFlightInfo.aspx.cs" Inherits="EditFlightInfo" Title="Edit Flight Information" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="edit_FlightInfo">
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true">
    </ajaxToolkit:ToolkitScriptManager>
        <div id="filter_data">
        
            <div class="title_module">
                Quản lý thông tin chuyến bay
            </div>
            
            <div class="conten_filter">
                <div class="field_container">
                    <asp:TextBox ID="txtFlightName" autocomplete="off" CssClass="txtAsp" runat="server" AutoCompleteType="Disabled"></asp:TextBox>
                     <ajaxToolkit:AutoCompleteExtender
                runat="server" 
                BehaviorID="AutoCompleteEx"
                ID="autoComplete1" 
                TargetControlID="txtFlightName"
                ServicePath="AutoComplete.asmx" 
                ServiceMethod="GetCompletionList"
                MinimumPrefixLength="1" 
                CompletionInterval="1000"
                EnableCaching="false"
                CompletionListCssClass="autocomplete_completionListElement" 
                CompletionListItemCssClass="autocomplete_listItem" 
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                DelimiterCharacters=";, :"
                ShowOnlyCurrentWordInCompletionListItem="true" >
            </ajaxToolkit:AutoCompleteExtender>
        </div>
        <span class="textfield">
                    Tên chuyến bay:
                </span>
                <br />
                <br />
                <div class="field_container">
                     <asp:DropDownList ID="ddlOrigin" CssClass="txtAsp" runat="server">
                        <asp:ListItem>Amsterdam (ASM)</asp:ListItem>
                        <asp:ListItem>Atlanta (ATL)</asp:ListItem>
                        <asp:ListItem>Austin (AUS)</asp:ListItem>
                        <asp:ListItem>Bangkok (BKK)</asp:ListItem>
                        <asp:ListItem>Beijing (BJS)</asp:ListItem>
                        <asp:ListItem>Boston (BOS)</asp:ListItem>
                        <asp:ListItem>Buôn Ma Thuật (BMV)</asp:ListItem>
                        <asp:ListItem>Chicago (CHI)</asp:ListItem>
                        <asp:ListItem>Cà Mau (CAH)</asp:ListItem>
                        <asp:ListItem>Côn Đảo (VCS)</asp:ListItem>
                        <asp:ListItem>Frankfurt (FUK)</asp:ListItem>
                        <asp:ListItem>Houston (HOU)</asp:ListItem>
                        <asp:ListItem>Huế (HUI)</asp:ListItem>
                        <asp:ListItem>Hà Nội (HNA)</asp:ListItem>
                        <asp:ListItem>Hải Phòng (HPH)</asp:ListItem>
                        <asp:ListItem>Los Angeles (LAX)</asp:ListItem>
                        <asp:ListItem>Miami (MIA)</asp:ListItem>
                        <asp:ListItem>Moscow (MOW)</asp:ListItem>
                        <asp:ListItem>Paris (PAR)</asp:ListItem>
                        <asp:ListItem>Rome (ROM)</asp:ListItem>
                        <asp:ListItem>San Francisco (SFO)</asp:ListItem>
                        <asp:ListItem>TP Hồ Chí Minh (HCM)</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <span class="textfield">
                    Từ: 
                </span>
                <br />
                <br />
                <div class="field_container">
                     <asp:DropDownList ID="ddlDestination" CssClass="txtAsp" runat="server">
                        <asp:ListItem>Amsterdam (ASM)</asp:ListItem>
                        <asp:ListItem>Atlanta (ATL)</asp:ListItem>
                        <asp:ListItem>Austin (AUS)</asp:ListItem>
                        <asp:ListItem>Bangkok (BKK)</asp:ListItem>
                        <asp:ListItem>Beijing (BJS)</asp:ListItem>
                        <asp:ListItem>Boston (BOS)</asp:ListItem>
                        <asp:ListItem>Buôn Ma Thuật (BMV)</asp:ListItem>
                        <asp:ListItem>Chicago (CHI)</asp:ListItem>
                        <asp:ListItem>Cà Mau (CAH)</asp:ListItem>
                        <asp:ListItem>Côn Đảo (VCS)</asp:ListItem>
                        <asp:ListItem>Frankfurt (FUK)</asp:ListItem>
                        <asp:ListItem>Houston (HOU)</asp:ListItem>
                        <asp:ListItem>Huế (HUI)</asp:ListItem>
                        <asp:ListItem>Hà Nội (HNA)</asp:ListItem>
                        <asp:ListItem>Hải Phòng (HPH)</asp:ListItem>
                        <asp:ListItem>Los Angeles (LAX)</asp:ListItem>
                        <asp:ListItem>Miami (MIA)</asp:ListItem>
                        <asp:ListItem>Moscow (MOW)</asp:ListItem>
                        <asp:ListItem>Paris (PAR)</asp:ListItem>
                        <asp:ListItem>Rome (ROM)</asp:ListItem>
                        <asp:ListItem>San Francisco (SFO)</asp:ListItem>
                        <asp:ListItem>TP Hồ Chí Minh (HCM)</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <span class="textfield">
                    Đến: 
                </span>
                <br />
                <br />
                 <div class="field_container">
                    <asp:TextBox ID="txtSchedule" CssClass="txtAsp" runat="server"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" Format="d-MM-yyyy"  TargetControlID="txtSchedule">
                </ajaxToolkit:CalendarExtender>
        </div>
                <span class="textfield">
                    Lịch bay:
                </span>
                <br />
                <br />
                <div class="field_container">
                   
                    &nbsp;<asp:CheckBox ID="cbFlightName" runat="server" Text="Tên chuyến bay" />
&nbsp;
                    <asp:CheckBox ID="cbOrigin" runat="server" Text="Điểm đi"/>
                   
                &nbsp;<br />&nbsp;<asp:CheckBox ID="cbDestination" runat="server" Text="Điểm đến"/>
                   
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CheckBox ID="cbSchedule" runat="server" Text="Lịch bay"/>
                   
                </div>
                <span class="textfield">
                    Tìm theo:
                       </span>
                <br />
                <br />
                <br />
                <div class="field_container" style="text-align:center">
                <asp:Button ID="btnSubmit" Font-Bold="true" ForeColor="White" Text="Xem" runat="server" 
                        CssClass="button" onclick="btnSubmit_Click" />
            </div>
            <br />
            <br />
            </div>
            
        </div>
        <div id="edit_data">
            <div class="title_module">
                Chi tiết chuyến bay
            </div>
            <div id="filter_result">
                <!--Gridview view-->
                <asp:GridView ID="gvFlightInfo" runat="server" BackColor="White" 
                    BorderColor="#7baad9" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" 
                    ForeColor="Black" GridLines="Vertical" AutoGenerateColumns="False" 
                    Width="802px" Font-Names="Arial" Font-Size="Small" AllowSorting="true">
                    <Columns>
                    <asp:BoundField DataField="FlightNo" 
                            HeaderText="ID" >
<ItemStyle HorizontalAlign="Center" Width="35PX"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="FlightName" 
                            HeaderText="CHUYẾN BAY" >
<ItemStyle HorizontalAlign="Center" Width="60PX"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="Origin" 
                            HeaderText="ĐI TỪ" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="Destination" 
                            HeaderText="ĐẾN" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="Class" 
                            HeaderText="HẠNG" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="Schedule" 
                            HeaderText="NGÀY BAY" >
<ItemStyle HorizontalAlign="Center" Width="65px"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="FlightTime" 
                            HeaderText="GIỜ BAY" >
<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="TotalSeat" 
                            HeaderText="SỐ GHẾ" >
<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField ItemStyle-HorizontalAlign="Center" DataField="AvailableSeat" 
                            HeaderText="CÒN SỐ GHẾ" >
<ItemStyle HorizontalAlign="Center" Width="40px"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:LinkButton ID="lbtnChoise" OnClick="lbtnChoise_Click" runat="server">CHỌN</asp:LinkButton>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="cbChoise" runat="server">
                                </asp:CheckBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCff" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#284775" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#d7e3f1" />
                </asp:GridView>
                
                
                
                <asp:GridView ID="gvEdit" runat="server" BackColor="White" 
                    BorderColor="#7BAAD9" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" 
                    ForeColor="Black" GridLines="Vertical" AutoGenerateColumns="False" 
                    Width="800px" Font-Names="Arial" Font-Size="Small" AllowSorting="True">
                    <Columns>
                    <asp:BoundField DataField="FlightNo" 
                            HeaderText="ID" >
<ItemStyle HorizontalAlign="Center" Width="35PX"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="CHUYẾN BAY">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgFlightName" Width="60PX" runat="server" Text='<%# Bind("FlightName") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ĐI TỪ">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgOrigin" runat="server" Text='<%# Bind("Origin") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ĐẾN">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgDestination" runat="server" Text='<%# Bind("Destination") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="HẠNG">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgClass" runat="server" Text='<%# Bind("Class") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="NGÀY BAY">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgSchedule" runat="server" Width="65px" Text='<%# Bind("Schedule") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="65px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="GIỜ BAY">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgFlightTime" runat="server" Width="40px" Text='<%# Bind("FlightTime") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="SỐ GHẾ">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgTotalSeat" runat="server" Width="40px" Text='<%# Bind("TotalSeat") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="CÒN SỐ GHẾ">
                            <ItemTemplate>
                                <asp:TextBox ID="txtgAvailableSeat" runat="server" Width="40px"  Text='<%# Bind("AvailableSeat") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCff" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#284775" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#d7e3f1" />
                </asp:GridView>
                <div id="button_in_EditInfo">
                        <asp:Button ID="btnUpdate" runat="server" Font-Bold="true" ForeColor="White" 
                        CssClass="button" Text="Cập nhật"
                        Visible="False" onclick="btnUpdate_Click" />
                    <asp:Button ID="btnEdit" Font-Bold="true" ForeColor="White" CssClass="button" 
                        runat="server" Text="Sửa" Visible="False" onclick="btnEdit_Click" />
                    <asp:Button ID="btnDelete" runat="server" Font-Bold="true" ForeColor="White" 
                        CssClass="button" Text="Xóa" onclick="btnDelete_Click" 
                        Visible="False" />
                    <asp:Button ID="btnNew" runat="server" Font-Bold="true" ForeColor="White" 
                        CssClass="button" Text="Thêm" onclick="btnNew_Click" 
                        Visible="False" />
                </div>
            </div>
        </div>
    </div>
</asp:Content>

